<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<div>
		<div></div>
		<p></p>
		<span></span>
	</div>
	<script>
		var div = document.getElementsByTagName('div')[0];
		var span = document.getElementsByTagName('span')[0];
		var a = document.createElement('a');
		Element.prototype.insertAfter = function (newE,oldE) {
			if(oldE){
				this.appendChild(newE);
			}
			oldE = oldE.nextElementSibling;
			this.insertBefore(newE,oldE);
		}
	</script>
</body>
</html>